home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / mlib / include / mevent.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-26  |  1.3 KB  |  49 lines

  1. ////////////////////////////////////////////////////////////////////////////
  2. // MEVENT.H
  3. //
  4. // header file for MEvent.
  5. ////////////////////////////////////////////////////////////////////////////
  6.  
  7. #ifndef __MEVENT_H
  8. #define __MEVENT_H
  9.  
  10. #define Nothing              0x00
  11. #define KeyPressed           0x01
  12. #define MouseMoved           0x02
  13. #define ButtonPress          0x04
  14. #define ButtonRelease        0x08
  15.  
  16. #define HNUL                    0
  17. #define MAX_EVENTS             50
  18.  
  19. #define MEVENT_ID               0x010B
  20.  
  21. class MEvent : public MObject {
  22. public:
  23.     WORD          dest;    // Handle of reciever, HNUL if for all
  24.     WORD          type;
  25.     int           xpos;
  26.     int           ypos;
  27. #ifdef __MMOUSE_H
  28.     buttonType    button;
  29. #endif
  30.     WORD          key;
  31.     WORD          dSize;
  32.     void *        data;
  33.     LONG          value;
  34. public:
  35.     virtual inline classType isA (void) {return (MEVENT_ID);};
  36. };
  37.  
  38. typedef MEvent *             EVENT;
  39.  
  40. ///////////////////////////////// Prototypes /////////////////////////////////
  41.  EVENT        GetEvent (void);
  42.  void         WaitEvent (EVENT event);
  43.  void         CreateEvent (WORD AType, WORD TDSize,
  44.                void * AData, LONG AValue, WORD ADest = 0);
  45.  void         FlushEvents (void); 
  46. //////////////////////////////////////////////////////////////////////////////
  47.  
  48. #endif
  49.